the "40 or 45" number isn't a measurement of size is mm. it is a percentage of the width of the tire that gives the sidewall height. a 205/40 17 tire is significantly shorter than say, a 325/40 17 (23.5" and 27.2" respectively).
so to properly answer a question like that, you have to know what width you want to use.
just trying to make sure you understand what you're looking at.
Mike and GX are both correct; and either the 275/40 or the 245/45 17's are very close to the height of the stock tire on the Stang. Either will result in your speedo being very close to reading the same way it did with the stock size tires on the car. Which doesn't necessarily mean it's accurate by the way.
Check to see if there is a speedometer shop in your area. If there is, ask about the Stewart-Warner speedometer gearbox. I believe it is either a 777 Series Drive Joint Kits and Parts or 666 Series Drive Joint Kits and Parts. It is a small gear box that fits between the speedo pickup gear on the transmission and the speedometer. It has quick change gears that allow you to choose almost any tire and rear end gear ratio you want. This will allow you to get the accuracy with within 2%-3% or less. The drawback is that it isn't cheap