A flexible controller for optimal control of linear time-varying stochastic systems with multiple time delays is developed. The plants to be controlled are represented using a multi-input multi-output controlled autoregressive moving average model. The delays are described using a diagonal matrix. Input and output filters in the form of linear time-varying moving average operators are introduced into a generalized minimum variance control cost functional in order to meet the needs of various applications. The controller is applicable to a large class of linear time-varying systems.