The output voltage is internally set at 24V measured from the GND pin to the VO pin. Your circuit will work but because the GND pin is no longer an absolute reference you will get poorer regulation. A better solution would be to lift the GND pin up from 0V to a regulated 16V, that will give a fully regulated 40V out. Try connecting a 16V Zener diode from the GND pin to 0V with the cathode end toward the regulator. Also connect a capacitor (10uF) across the Zener and add a resistor from the GND pin to the incoming 48V to set a fixed current of around 1mA through the Zener. That will help to keep it's operating voltage stable.
Brian.