The modified basic identity and weighted orbital integrals