In this paper, optimal estimation for discrete-time linear time-varying systems with randomly state and measurement delays is considered. By introducing a set of binary random variables, the system is converted into the one with both multiplicative noises and constant delays. Then, an estimator which includes the cases of smoothing and filtering, is derived via the projection formula, and the solution is given in terms of a partial difference Riccati equation with boundary conditions. A predictor for such systems is also presented based on the proposed filter and smoother. The obtained estimators have the same dimension as the original state. Conditions for existence, uniqueness, and stability of the steady-state optimal estimators are studied for time-invariant cases. In this case, the obtained estimators are very easy to implement and all calculations can be performed off line, leading to a linear time-invariant estimator.