OptiFine is an entirely safe mod pack that you can add to your Minecraft world, provided that you have downloaded it from the official OptiFine website. This way, you avoid the risk of viruses and malware or your account being stolen.