A top Shadow Cabinet member has invited Elon Musk to consider donating to the Conservative Party instead.