driving many optoisolators from Arduino

I need to send a square wave to many optoisolators from an Arduino. From my understanding driving an optioisolator is basically the same as turning a LED on. In this case, the optoisolator's LED is in series with a 2k resistor and a zener diode, these are part of another device, so I cannot change that. That device is here : http://www.ximea.com/support/wiki/usb3/Digital_Input

It the optoisolator circuit requires 15V-24V to turn on. I'm thinking of using a mosfet transistor with an 18V power supply. What I don't exactly understand is how to wire the mosfet. If the optoisolator circuit is between +18V and D, then I'm basically opening and closing the GND, but GND is used by other things, I cannot disconnect it like that ? And If I put the optoisolator circuit between S and gnd, then Vgs will not be 5V.. ? Am I missing something ?

Search for high-side switching using a p-channel MOSFET and an NPN level shifting transistor.