Electro-mechano-optical detection of nuclear magnetic resonance