What can I use to automatically turn off a bathroom heater after a fixed time?
You don't say the power specifications of the heater so be very careful about the switching you select.  If it is a simple 120volt electric heater, you could go with something like a Leviton LTB02-1LZ but the wattage of your heater may be too high.  

There are other switches available that will probably handle the load but you will need to know exactly what your heater requires.