Modeling the Production of Flares in Gamma-Ray Quasars