Probably better to built your system around a H-bridge chip (assuming the current needed in the motor isn't too high) like a TB6612FNG or the rather inefficient old L293D. Then use an opamp to monitor the phototransistor so as to detect light levels, put this through another op-amp acting as a comparator with hysteresis (op-amps usually come in multi op-amp packages, so you might as well slightly misuse one op-amp to be a comparator rather than get a dedicated comparator chip), then feed this signal to the h-bridge chip. You sound like a beginner, so you'll definitely find it easier to work with IC chips (like op-amps, varous logic gates, and h-bridges) than with discrete transistors or MOSFETs.