A nice square wave is desired. 1, 2.2, or 4.7 kilohms are acceptable substitutions. Lower values cause the NAND chip's current to begin driving the infrared LED, not just control it. Since we know that the HC NAND gate isn't capable of driving the LED by itself, let's keep the power flowing from a component that's designed to handle it. Higher values cause the infrared LED to not be as brightly lit, because less current would flow through it.
Lower values cause the infrared LED to shine more brightly.
The 7 milliamp limit currently chosen for this circuit is too conservative for actual use. Many infrared LEDs are capable of 40 milliamps continuous, perhaps more peak. Check out the datasheet on the LED you choose to use. Removing this resistor would be a disaster. Nothing would intentionally limit the current through the LED and it would melt or pop or otherwise die a rapid and horrible death.