Tim, do you know if this bike was used for enduros? The plug could be a connection for a digital timer or gps maybe. Also with the switch there it may have been used for the extra cooling fan. I don't think that fan is stock, I think it was added for slow speed trail riding to draw more air through. I could be wrong but that is not something I would think KTM would have build either a larger radiator or used a much nicer fan that would be more water proof "looking" at least.
I do think that the yellow and black wires were for an accessory wired by the previous owner that they removed before getting rid of the bike.