If you are playing MC on the download, open it up, and hit Options, then start it up. It will get rid of any mods and set the minecraft.jar file back to normal. From there, download the mod, delete the META-INF file from the jar file, then add the files from OptiFine into the jar file. Hope that works