Hi,
Oh i see now he wants to drive a mosfet...that is a different story.
To drive the mosfet properly you need a faster rise signal than an
opto can provide, unless the mosfet can tolerate a bit of extra heating.
The typical way this is done is to drive a logic gate with the opto, such
as a schmitt trigger inverter, then use the output to drive the mosfet
driver.
Another even better way is to get a dedicated mosfet driver chip. These
not only can provide the proper high current gate drive, but can drive
the gate high and low with fast rise and fall times...both a very good idea.
Many mosfet driver IC's already have a schmitt trigger built in too.