You have 2 options:

1. Have a timer circuit wired that feeds BOTH the pump and heater, so that when the pump is turned off, so is the heater.
2. Operate the pump 24/7 during periods when you are using the heater.