Expanding a bit on Falcon's advice: Now is a good time to buy those tickets. Fares are likely to start to increase soon. Fuel prices are rising meaning air travel could become considerably more expensive, particularly getting closer to your intended time of travel. I arbitrarily selected a date of 25 April Toronto - Madrid, return 6 June Madrid - Toronto and found a fare of C$650 on a major travel website. Playing around those dates both an Indian carrier and American Airlines had comparable fare prices in that range. That's about as good as it gets.
Your options for getting from Madrid to Roncesvalles will all go through Pamplona:
1) you can fly from Madrid to Pamplona. If you do this it is cheaper to buy a roundtrip ticket setting up an arbitrary return date than it is to purchase a one way ticket. Use the Madrid to Pamplona portion on your desired day of travel then discard the return Pamplona to Madrid potion. Seems illogical that a round trip ticket is less expensive than a one way ticket, but with an advance purchase that is usually the case. Airfares often times are structured to really stick it to the one way traveler;
2) you can go from the Madrid airport into the city of Madrid and catch a train to Pamplona; or
3) there is a bus that goes directly from the Madrid airport (you may have to transfer via the airport shuttle to a terminal in Madrid Airport other than that in which you arrived from Canada). The bus then to Pamplona runs at frequent intervals. No advance reservation is required. The information desk in the airport can direct you further on precisely where to buy the ticket (there is a ticket machine outside the terminal - you will need to pay in Euros - no credit cards accepted) and where to get the bus. It is actually a very pleasant ride to Pamplona and likely is the most economic means of travel.
There is a central bus station in Pamplona at which you can catch a bus to Roncesvalles. A bus leaves daily at 18:00.
If any of this seems a bit complicated the reality is that it is easy to get from Madrid to Pamplona then onto Roncesvalles. You are likely to see other people making the same journey. Information counters at the airport and bus station are most helpful in providing direction.
As for returning from Santiago to Madrid: if booked in advance a one way air ticket, contrary to most instances between other cities, is very inexpensive. Several air carriers service this route making travel time options relatively convenient to connecting flights that depart Madrid for trans-Atlantic destinations later in the day.
Aside from all of the above, you also have the option of going through Paris instead of Madrid. As I am not as familiar with those logistics I can't comment except to note that traveling from North America through Paris seems to often be more expensive and more involved than traveling through Madrid.
Finally, this forum has an entire section titled "Traveling to/from the camino" that specifically covers travel logistics. You might check that out as well.
Buen Camino!