Dynamic programming for optimal control problems with delays in the control variable