You would need some type of temperature sensor. Temperature controlled irons likely use either thermocouples or thermistors (probably the former as they are generally perfectly happy at high temperatures). If you were able to wire a thermocouple down near the tip of your iron, you could simply read the temperature and implement some controller (PID, fuzzy, whatever) to manage the power.
Alternatively, you may be able to read the temperature based on the change of resistance of the heating element. Monitor the voltage and current passing through the element to get the resistance (R = V/I), and use the temperature coefficient of resistance of the element (probably Nichrome) to calculate the temperature. It would take a great deal of care to get this to be decently accurate, as you'd have to subtract out the lead and possible connection resistance (both of which may also change with temperature).
In any event, your results are bound to be fairly poor. Beyond simple temperature control, there are often many other significant differences between a Radio Shack iron and a (e.g.) Hakko. Namely, the proximity of the heating element to the tip (good irons will have their heating element inside the tip), and the "density" of the heating element (the entire 65 W heating element in a Hakko is about 3/16" dia. x 1/2" long), both of which serve to couple the heat generated into the tip extremely quickly and efficiently. If you simply want a temperature-controlled iron, just buy one. The only reason to make one is for some design experience (but it's been done before, so really why bother? Spend your time on something totally new).