You could feed a 12v through a buck converter (from the same 24v you power the Duet... Google about multiple voltage on Duet you'll see how to do that) to the V_FAN input and then plug the laser to one of PWM Fans output so you'd be able to power the laser from 12V on/off with a simple M106/M107 gcode.
Hope it helps.