In that case its even more simple.
Laser at one end. Reciever at the other. Maybe a simple photodiode, with a relay. If the laser is shining on the photodiode (or phototransistor) all the time, then it'll easily distinguish betwen on and off, because lasers are so damn bright. So, phototransistor -> comparator -> transistor -> relay -> solenoid/motor for the trigger.
That could be done on stripboard, very small. Although....heres the clincher, when the laser isn't shining on the detector, it'll trigger the solenoid, so your bb gun will be popping off rounds like GI Joe. Best to align, turn the laser on, THEN turn on your circuit to 'arm' it, otherwise setup will result in casualties
Seriously though, I could draw up a schem, but just google for 'light detector', most will use a LDR (light dependant resistor) and a comparator of some kind. I guess you'll have to sort out the mechanism for firing the BB gun, a motor would have to be geared down, and then rigged to a lever to have the torque to pull a bb gun trigger. I recommend a simple solenoid, it'll also be quicker.
UNless of course your 'bb gun' is one of those electric jobs? in which case just replace the trigger switch with a relay and jobs a goodun
Blueteeth
Ps. This isn't some student gag to stop flatmates enetering your room is it? I will not be responsible for 6mm bruises!