Yes, you can cook anything in cast iron as long as it is well seasoned. Some foods, especially acidic types, will interact with the iron and this is why a well seasoned pan is highly recommended.