Yes, you can substitute oil for butter, but I wouldn't recommend it. Using oil makes your carrot cake more moist and decadent and will give you the best results. The butter, even melted, will make for a dryer cake. Because you are adding carrots and walnuts, you need the extra moisture that the oil can give you.