Yes, you can substitute oil with butter. But keep in mind that oil contributes to the moistness of the cake, while using butter it may make the cake dense.