The simplest way is to use 2 relays each with 1 NO and 1 NC contacts. The relays are driven by the 8051 using optocouplers follow by a npn transistor(my option). The power schematic is
V+ --- R1NO --- Motor---- R2NC - gnd
gnd -- R1NC--| |---R2NO - V+
If you close relay1, motor will rotate one sense. Closing relay2 will rotate the other sense
Another option is to use instead of relays 4 power transistors (or 2 transistor and 2 diodes) in a H configuration.
Fuses are necessary to be use.