You'll have to look at the charge controller specs to see what it is capable of, for example the current.
You may need to have its output to the heater, open a normally closed relay to disconnect the regular 48V supply to it.
You may find it takes a terribly long time to heat the water with it, that you end up disconnecting it to let the heater run from the intended 48VDC supply while in recovery mode. You might be able to develop some circuit that overrides the relay opening based on the tank water temperature so it only switches to 24V solar panel input for temperature maintenance.
Are you certain you're really going to have enough excess solar power to bother? If so you may be overpaying for a larger solar array than needed, or could get another battery to have more reserve capacity and not discharge the batteries as low, as well as gain the capability of powering higher current loads (given a suitably sized inverter).
Frankly I would wait and see what the charging duty cycle is. Many panels have nice lofty ratings that are just "best case" and won't be achieved.