MoGU: A Framework for Enhancing Safety of LLMs While Preserving Their Usability