Yes indeed. If you know the voltage level from the Pi pin (3.3V if GPIO), then you can use basic math to work out what value resistor you need in order to divide that voltage between the LED and the resistor. You also need to know about the current draw - GPIO pins only support small currents as outputs (maximum 16 milliamps per pin, total 50 milliamps for all pins), which if exceeded will very likely damage the Pi.
Try an online calculate like this: http://led.linear1.org/1led.wiz
. If you plug in the values from the article in my previous post, it gives you the exact same value for R1 (560 ohm). You could plug in 3.3V for the GPIO, the forward voltage given for your LED, and a current between 2ma and 16ma to find a value for the resistor to use that should be safe. E.g. http://led.linear1.org/1led.wiz?VS=3.3;VF=1.3;ID=4
This next tutorial also talks about the need for a resistor, and directly drives the LED from a GPIO: https://projects.drogon.net/raspberry-p ... single-led
If you want to drive multiple IR LEDs for illumination purposes , you'll need to use the 5V supply and transistor method (or LED driver chip) as you'll probably need more current than the Pi can safely handle through its GPIOs. The 5V supply can deliver much more current, as it comes ultimately from the power supply you plug into the Pi.
If you want to do more, it's definitely worth spending some time learning more about the relationships between current, voltage and resistance - and how they apply to different components. A quick start is here: http://www.talkingelectronics.com/proje ... Guide.html