A parametric approach for solving a class of generalized quadratic-transformable rank-two nonconvex programs