The optimal temperature for cooking shrimp in the oven is 400 degrees Fahrenheit. This helps to ensure that the shrimp cook evenly and don't overcook.