Optically detected nuclear magnetic resonance of nuclei within a quantum well