I just have all yellows together. There are some traffic signals which got from red to yellow to green. But for separate yellows you would need 5 wired.
If you think about it, there are basically four states on your average traffic light (not counting newer lights that go all-red for a couple seconds to compensate for scofflaws.) There's RG, RY, GR, and YR.
If there were no yellow lights, it'd be easy to use just two wires: wire the red light of one side and the green of the other side in one direction, and the red of the other side and the green of the first side in the other direction, and then the direction of the current determines the state of the light. Drive one line high and the other low for one state, and vice-versa for the other state.
Yellow adds an extra wrinkle that I think you can resolve with a three-state driver. Wire the yellow LED for each side "next to" the green of that side, in the sense that it's wired to the red of the other side in the same way as the green, but feed the free end of it with a separate wire. Now you have your original two wires, plus one wire for each of the yellow sides. Drive it the same as before, but when you want yellow on one side, float the green wire for that side while driving the yellow low. For green, float yellow and drive green low.
So, there you go: four wires, but you can't do an all-red indication.
(Disclaimer: I haven't tried this, and my knowledge of electronics fits on a napkin, in large print. But it seems logical.)
Edit: Thinking more about this, I'm not sure that you couldn't tie the two yellow lines together and get away with THREE wires.