An optimized harmonic reference system for the evaluation of discretized path integrals