You can't with a normal Arduino and WiFi shield.
However it is possible (if you are cunning) to do it with the ESP8266.
The basic idea is that you program an ESP8266 module to act like a transparent TCP/IP to UART bridge. Connect it to the TX and RX pins of the Arduino, listen on a port number of your choice, then when you connect to it (with telnet, netcat, socat, etc) all data is forwarded directly back and forth to the UART interface. If you monitor the connection state as well and use that to drive an equivalent of the DTR pin you can reset the Arduino automatically when you connect.
There is an example in the ESP8266 core that does it all apart from the connection monitoring, which is easy enough to add.
Then it's just a case of getting your computer to connect a virtual serial port with the remote socket on the ESP8266 and you have OTA programming for your choice of target board.
On Linux you can use
socat for that:
root@foo:~# while `true`; do echo "ready"; socat pty,link=/dev/ttyACM99,raw,wait-slave,user=youruser,group=dialout tcp:192.168.0.16:24; done
(yes, you have to run it as root).
Quite how you'd go about that on other operating systems I don't know. I think socat is available on OS X. Windows is anyone's guess though.