99.9% sure it's air in the coolant system. Your temp goes up when a pocket of air circulates and then drops back when coolant goes through. Bleed the coolant system. 10 minute job, 2 if yuor car is already warmed up.
The reason it's not getting hot when your heater is on is because the heater is "cooling" the engine slightly, and the thermostat is completely open (at least from what I've read) when the heater is on.