All-optical magnetic resonance of high spectral resolution using a nitrogen-vacancy spin in diamond