You want to use the smallest, narrowest pan you have. The reason for this is that you're essentially trying to fry the spices in the oil. So, if you use a larger pan, you can still make the tadka, but you may need to tilt the pan to ensure the spices are fully submerged/coated in the oil. There is also a special type of small pan called a tadka pan that you can purchase if you make Indian food often -- see here for more details on a tadka pan.