Yes, it is generally safe to use aluminum foil in the oven as long as you follow some safety precautions.
Make sure to use the shiny side of the foil facing out and avoid using it for high-heat cooking methods like broiling. Also, be careful not to overcook your food as foil conducts heat and can cause food to cook faster than expected.