I'm looking to remove the pilot bulb, wire it to a relay and power two fog lamps instead. Would this pass an MOT? (fog lamps substitute for the pilot bulb).
If your DR-Z doesn't have a headlight switch, they are unlikely to know that it doesn't have a working pilot light and they are not allowed to take a vehicle apart in any way to check components.
But they may have issues with two foglamps that come on with dipped beam - but I don't know for sure.
"A motor bicycle (with or without a side car) fitted with a headlamp need not have a front position lamp (but must have one on the side car, if a side car is fitted)."
Fog lights are not covered on cars or bikes so you should be OK.
why not just tap into the power for the Parking light (leaving the bulb and existing where it is and working)
Thats how the aux lights on my dakar work, power from the parking light goes through a switch to a relay coil. Means all you have to do is strip back some of the insulation on the +ve wire to the sidelight, solder a new wire to it (to go to the switch / relay) and tape it up (with amalg tape if you have it). The relay takes sod all power to energise so it doesn't affect anything, if your really bothered remove the bulb.
I can do a simple wiring diagram if you want, but it's piss easy
btw make sure your switch / relay wire is long enough before you solder it on, i didn't