24v output from two 12v batteries in series, charge them with 12 volts in parallel
On the face of it, not really unless you use switches to take the batteries offline while you charge them.

Now if you can use 2 chargers, and the chargers have a floating (ungrounded) output, you could connect each one across each battery. If the batteries are to be kept online ensure that the charger has current limiting and reverse-current blocking.

Or, use 1 charger and use a DPDT relay to switch the charger between each of the batteries in turn. But then you have to control the relay...

Or, eBay your 12V unit and get a dual voltage unit like this one: https://www.altestore.com/store/charge-controllers/solar-charge-controllers/pwm-solar-charge-controllers/xantrex-solar-charge-controllers-pwm/xantrex-c35-charge-controller-35a-12-or-24v-solar-charge-controller-p2069/