Of course. "Pay by productivity" does not mean "pay everybody the same per hour of labor". Cook's output has greater influence on the company than any (or perhaps almost any) other employee at Apple. He should be paid commensurate to that output.
I assumed you meant something along the lines "pay everybody the same per hour of labor" since that seems to be how most people describe productivity.
Not everybody is equally productive. Somebody who has more skill or knowledge in a profession like software engineering will be considerably more productive than a less skilled engineer. Among leftist circles, I think you'd be very hard pressed to find people who describe productivity as literally just "number of hours worked".
How many software companies got off the ground, hired people, PAID SALARIES, yet never got to see themselves become profitable?
How many companies would not even have existed if there was no risk investment done?
Tim Cook working for one day could easily have a larger impact than most people will have in their entire lives because he has extremely high leverage.
Is it fair? Absolutely not, but life is not fair. I don't understand what moral obligation society should have to base compensation on productivity.
PS: you could argue that Tim Cook is far more productive than everyone else because he produces far more results than everyone else.