Sure, just put a current limit resistor between the Arduino pin and each of the LEDs. Limit the current to 10mA with ~250 ohm resistor.
When Arduino pin is high, top LED turns on.
When low the bottom LED turns on.
When set to an input pin, both LEDs may turn on, depending on their Vf. You will +5-anode-cathode-resistor-(Arduino input)-resistor-anode-cathode Gnd. If Vf is low enough (<2.5V), then 2 LEDs in series with 500 ohm resistance could have maybe 0.5mA flowing, the LEDs may turn on dimly.