For converting your wall outlet's 240v AC to a usable +5v DC for logic, see this page:
**broken link removed** Check out their "General-Purpose 12 Volt 1/2 Amp Power Supply." Use an appropriate transformer rated for 240 volt input for your country, as the one shown in the diagram is for US or other ~120v countries. Also, instead of using the 7812 for 12 volt regulation, use a 7805 for 5 volt regulation. Now you've got a stable +5v DC supply. Onto the rest of the project.
As for the traffic lights themselves, it depends on how complex you want to get. Are we only talking about an intersection where straight directions are concerned, such as if one direction is green or yellow, the opposing is red? Or will there be left turn leading green indicators? Pedestrian crosswalk buttons to turn them all red at same time? I am going to assume it is simply the first case, as it is the easiest to implement.
If you look below, in cases A and B, north/south Red is on whenever west/east Yellow or Green is on. In cases C and D, west/east Red is on whenever north/south Yellow or Green is on. While that may look obvious, here's the connection: If a signal is present on any green or yellow indicator, pass that signal on to the opposing direction's red. That way you wouldn't need any logic at all at this point. Check the diagram on down for an illustration. Note that a current limiting resistor needs to be in there somewhere.
If this thing is going to be completely automatic, perhaps use a 555 timer to generate a clock pulse, and a 74ls90 counter to generate the different states. If you're not allowed to use any of those, as you mentioned the op-amp as your only piece, perhaps someone else could offer an idea? I don't know how you would use an op-amp in this project.