Resistor math in complex circuit
R1 should be zero ohms, but the collector of the optoisolater should be connected directly to the positive terminal of V1.

In order to make sure it's saturated, the base current for Q1 needs to be somewhat greater than the motor current divided by Q1's worst-case (lowest) current gain, so R2 should be V1 divided by the base current.

The purpose of R4 is to prevent leakage current through the opto from turning on Q1, so its value needs to be less than 0.6V divided by the worst-case (highest) leakage current value.