Ciao,
Unfortunately this is the correct use of optoisolator, a safer approach. The use of transistors is quite regular in this applications. You have to consider that voltage isolation is a critical issue.
You can still use the optocoupler led drive circuit that I sent to you (the last picture that I uploaded). You can change the optocoupler output stage connection. See the image attached. In this case we have a pull-up connection. When the pwm is high the optocoupler transistor is on and the V_out will be +5V. In your connection if the optocoupler transistor is on will pull-down the V_out.
If you search in internet you can find lots of info (i.e.
http://www1.jaycar.com.au/images_uploaded/optocoup.pdf )
Francesco.
