I don't know what you mean by "program the LED". You pass current through an LED and it lights. Since the mega8/168 can safely source or sink up to 40 mA with its digital I/O pins, it can light standard LEDs (which typically have good brightness at anywhere between 2 and 20 mA).
Connect your LED to any digital I/O pin you want (don't forget to put an appropriate resistor in series with the LED) and then drive that pin high to light the LED (assuming the other side of the series circuit is connected to ground). Why would you think that you could only use port D pins?