Galvanic separation between a microcontroller and a motor driver
For the inputs any common optocoupler should do, like a CNY17. If you want to control the motors with HF PWM the 6N135 may be a better choice; it's faster.  

For the feedback you have an analog signal, so the CNY17 is no use here. There are linear optocouplers, however, like the IL300. The current transfer function is anything but linear, but thanks to a second photodiode to use in a feedback loop you get an excellent 0.01% servo linearity.  

  

The power nets (\$V_{CC}\$ and \$GND\$) at the left are obviously different from those at the right.


  Note: Servo linearity means that neither LED nor photo-diode need to have a linear characteristic (they don't), but that they can achieve this linearity by using them in a feedback system like the one shown in the schematic. The conditions for such linearity are good matching between photo-diodes and a good matching of the current transfer function between LED and either photo-diode.