Optimization of photon tracking in GATE