Approximately Optimal Core Shapes for Tensor Decompositions