Transistor Base Resistor Choices?

I know that resistors are needed to limit the current for LEDs. A have an IR LED that uses 1.6V @ 50mA. I could use a 100 ohm resistor to a I/O pin, but I/O pins are limited to 40mA. Can I use Transistor 1.png? Isn't the 1k ohm resistor on the base supposed to limit the collector current to about 50mA? I will be using the 2N3904 from before.

Transistor 1.PNG