Different Derailleurs with different shifters
Shimano 8 speed derailleurs and Shimano 8 speed shifters are always compatible.  So yes, you can use the 8 speed M310 shifter with your 8 speed derailleur.