The NXT uses the same motor driver chip as the Power Functions IR Receiver. Both use the LB1836 dual motor driver (the NXT uses a single port equivalent for the extra motor port).
That means the NXT will happily drive the same amount of motors as a PF IR receiver, i.e. 2x M-motor or 1x XL-motor per port.
The XL motor uses the same metal motor as the NXT motor.
RE: programming, I suggest you turn the motor on for a time, not a distance, unless you have created an equivalent LED quadrature sensor to use pins 3-6 of a motor port, to go with the PF XL motor. This might be possible with a PF light brick and the right sensor LEDs, or alternatively slotted IR devices. Depends if you are familiar with making electronic devices for the NXT.
I expect a single PF light brick might work with the 15mA current source of a sensor port, on pins 1 and 2. Before you do it, check how much current a single light brick draws from a 9V power source (fresh batteries etc...). Don't do it at all unless it's less than 20mA total, preferably 10-15mA or less.
Unless you have verified a small enough value (7.5mA or less) Don't connect more than one PF light brick or it will definitely overload the port's current source. White LEDs tend to need 30mA instead of the usual 20mA for standard red LEDs, and there are two of them, which makes a possible 60mA. That said, the circuit of the light brick has 4700 ohm resistors, which limit the current per LED to 1.27mA, or 2.6mA total for the light brick. In theory up to 6 would work with the current source, but check this properly and don't overload the current source or run it near the limit for long periods. You would be wholly responsible for any consequent failure of your NXT! the limit might be a bit less than 15mA for the NXT. The 15mA came from the RCX, which had a current source made from a 39 ohm resistor and 2 transistors.
If your NXT is running from a LiPo battery and the maximum voltage is 7.4V instead of 9V, the current source will have correspondingly less capability.
To program the lights, you need to turn on the current source. The easiest way is to use the RCX light sensor programming block in reflective mode (which turns on the LED of the RCX light sensor). I'm sure at least one NXT sensor uses it too, but I haven't done it myself.
I have also powered an LED from pin 5 of a sensor port, which is open drain in one mode or another, using a transistor and resistors from the 4.3V supply on pins 3 and 4. Turing the LED on and off depends which sensor is assigned to the port. I think I toggled it between a sound sensor and a light sensor. Picture at
http://www.brickshelf.com/cgi-bin/gallery.cgi?i=1830446.
Mark