Structural, morphological and optical properties of MgO nanoparticles for antibacterial applications