Measurement of the weak dipole moments of the τ lepton