Monte Carlo calculation of correction factors for dosimetry in radiotherapy using the correlated sampling method