Why not try this?
First go into your video settings and turn everything to the lowest settings possible. (If you want, raise your render distance up one. Don't just keep it at tiny!) See if that helps. If it does not, then continue reading:
When you're installing Optifine what did you install? Did you go to the official Optifine link? If you did not then that is probably why it is crashing! Why not go to
http://www.optifine.net and download the 1.7.2 version. It should come with an installer. If it does not come with an installer look up a video on YouTube. [When you get Optifine go to your video settings and look for other. Then, click it and look where it says Fullscreen Mode. Based on you're computer change it. I would recommend the lowest or somewhere near. I will warn you, it will make Minecraft look like its on a crappy computer. But trust me, it works! Remember, that's only if you can get your Optifine to install and if you're running full screen mode!)
Another tip is to not run Minecraft in full screen. Take it out of full screen and make it small. When you do this your FPS will go up!
Also, the reason for the lag spikes and the lag is because you probably do not have a good computer. Go buy a gaming pc and you should be good to go!
I hope some of my tips helped you!
If they did, message me