I just uninstalled optifine as it has been giving me nothing but problems. I hope it's the source of some random crashes as well. Hopefully this fixes the lag spikes.
Edit: Still getting lag spikes after uninstalling optifine, but not as bad. Strangely, my FPS went up as well. No crashes either.