Global solutions with shock waves to the generalized Riemann problem for a class of quasilinear hyperbolic systems of balance laws