Can I transfer to W from D and then immediately from SS ?
Yes, you can.
There are no limitation as to how many Pokemon you can transfer a day.
Link to Bulbapedia saying the same thing in the middle of the paragraph