Replacing two LEDs with a 2-pin, bicolor LED, using a circuit that reverses polarity based on two inputs
Given that the pins are open drain, the following circuit should work quite nicely:







simulate this circuit &ndash; Schematic created using CircuitLab

You'll get some wasted power as one of the resistors will be pulled straight to ground when an LED is turned on, however if you go for a low-current LED, you can increase the resistance to reduce the amount of wasted current.



Alternatively, the simplest option would be to use a common-anode 3-pin bi-colour LED. This would then be wired up exactly as the diagram in your post, with the common anode via resistor to +5V, and the two cathodes to your outputs.