Tell us about yourself!
The optocoupler should receive de control signal from your microcontroller and then its output should be connected to the inputs of the L293D. But, remember that you´ll need two DC sources, one for the motor and another for the Arduino or microcontroller your using, both grounds should be coupled.
Everytime you work with a huge load, for example an electric motor, you should add any type of protection (isolation) between the control and the output stage, such an optocoupler, to avoid risk of damaging the controller. It´s just my recommendation :)