OK for what you want you will want a 6 function decoder. You will need to wire it up as follows.
Func 0f Front Headlight White wire
Function 0R Rear Headlight Yellow Wire
Function 2 Right Ditch Light Green Wire
Function 3 Left Ditch Light Purple Wire
Function 4 Front Red Markers
Function 5 Rear Red Markers
If you don’t do rear marker lights then you can go with a 5 function decoder and maybe still keep the plug even though I would recommend hardwiring the decoder anyways. Now you can use 1.5v bulbs and use the proper resistors depending on the bulbs you use or you can do the LED route which maintenance wise is a better solution even though the lights won’t look like real bulbs. I have chosen the LED route on my locos due to the fact that when 1 bulb burns out you will most likely break something trying to replace it. What you want is similar to my CR locos I do as they also have Red markers on both ends.
I still have to get a fleet of P40's and P42's eventually but I model mainly in the F40PH era so the P40's were new and they also had strobe lights adding 2 more functions! And if you think thats bad I am eventually going to work on a fleet of Several AEM-7 Electric locos and if I add Ditch lights to them then I am looking at a total of 12 functions per loco! LOL
I have done various installs and you can see them here
http://mgwsy.smugmug.com/ModelTrains-2
If you need some help let me know.