Yes, you can. Cupcakes made with butter taste better, but cakes and cupcakes made with oil tend to be \\"fluffier\\" and last longer. A good rule of thumb to replace butter with oil would be to use about three-quarters of the amount of butter that is called for in the recipe.