What is doing the controlling... you with switches? Or is it supposed to autonomously run in one direction for X seconds and then reverse, etc?
Break the problem down into several smaller problems.
1. How do you control the direction of a DC motor -- look up H-bridge circuits as well as H-bridge ICs and motor driver ICs. A simple way for a small low current motor is to just use the motor driver IC and be done with it.
2. How do you control the speed of a DC motor -- the *best* way to do this from an efficiency, torque standpoint, is to use Pulse Width Modulation (PWM). You can look that up next. The lame way to do this is to use a variable resistor of appropriate wattage. The better way to do this is using some type of multivibrator operating at > audible frequencies with adjustable duty cycle. The 555 timer would be one option...
3. How do you send a signal that is on for X seconds and off for X seconds -- look up 555 timers and how to use one as a multivibrator. You can create a pulsetrain of adjustable frequency and duty cycle. Actually there is a dual 555 called the 556 ; one could do PWM, the other could do the forward/reverse signal.
4. How do I interface the 555 signal with the H-bridge -- depends on what you are using for your H-bridge... ask when we come to that point
If you're just using an L293 or SN754410, it is probably fairly simple.
Michael