Is it millivolt (no electric power needed) or a digitial ignition heater? If digital, you can hook it up to the load side of the timer just like the pump, and it will only get power when the pump does.
Either way, your heater has a flow sensor that will not allow it to run if the pump is off.