A new polynomially solvable class of quadratic optimization problems with box constraints