Optimal control for stochastic Volterra equations with completely monotone kernels