The pilot stated that the airplane was in level flight, at night, in clouds and light rain, when he saw a '...sudden flash (spark)...' followed by fire from behind the instrument panel on the right side of the cockpit. The pilot reported that he turned the master switch off in an attempt to eliminate the source of the fire. He stated that the cabin filled with smoke, but the fire gradually '...went out, mostly on it's own...' He made an uneventful landing at Beckley, WV. Maintenance personnel reported that fire damage precluded a positive determination of the source of the fire.