Ramond-Ramond S-matrix elements from the T-dual Ward identity