Yes, any PC gamepad with analog sticks will work with iRacing.

First you'll need to plug the controller in to your PC via USB or USB dongle + wireless, install the drivers if need be, and you're good to go.

Then in iRacing you calibrate it as you would a wheel. Follow the onscreen instructions and move move the stick left and right when it asks you to calibrate steering... push down the triggers for gas and brake calibration, etc.