Yes, absolutely, as long as the voltage rating for the insulation is compatible.
Assuming the insulation is 300V or 600V, I'd use 500V on the megger.
Caveat - make sure there is nothing on the ends of the wire! A duplex outlet with nothing plugged into it wont mind being meggered, but a smoke or thermostat with electronic bits in it may have a total sense of humour failure.