how to wire MCP41x1 Digital Pot

You have chosen an SPI device and the example is for an I2C device.

For SPI you will need to use the SPI library instead of the Wire (TWI/I2C) library.

SPI uses 3 or 4 pins:
MOSI (Master Out / Slave In)
MISO (Master In / Slave Out)
SCK (Serial Clock)
SS (Slave Select)

Look at the SPI library examples.