How to control speed and direction of motor 180VDC 0,3 A

It sounds like you solved your problem already. Examples of H-bridge schematic with optocoupler should be dead easy to find on Google.

So what's your problem, exactly?