An optical mouse might detect a person that is 1mm away. Somebody walking past your door might be 1000 times or more away. It needs a high gain amplifier to do it.
Use a more powerful IR tranmitter. You can use one that you would commonly find on a garage door system or other similar device. Or more cheaper are commercial IR LEDs that will transmit at long distances. I'm not sure about the mouse. The IR LED in your TV remote would even work.
A PIR (passive infrared) motion detector has a corrugated lens that feeds an IR detector. Motion causes the IR radiation from a person to make an AC signal due to the corrugations in the lens which is amplified.