Optimal control for stochastic heat equation with memory