A multilevel structure for a class of linear dynamic optimization problems