You are most likely chasing your tail by swapping out existing 12-14V bulbs for 24V bulbs. Keep in mind that the power consumption of toy train bulbs nominally increases with voltage rating when fully lit. For example, at full brightness, an 18V #1445 bulb will consume 3W, and a 12-14V #53 bulb will consume 2W.
If you install 24V bulbs, and power them at 50%, you will probably tax your transformer with the same power consumption as 12V bulbs powered at 100%. So you now have dimmer lights but your transformer heats up just the same as before. Why not just turn your voltage down leaving the existing bulbs alone?