Yes, you can. Oil will make a higher more tender cake that will last longer, but a butter cake will taste better.