Can Specializing Too Early Hurt Your Career?

The sure way to career success is to settle on an area of specialization as soon you can and then engage in that specialization as often as you can, putting in your 10,000 hours, until you become an expert in that area, right?