Optimal control under discrete observation of continuous stochastic systems with time delay