When a starship crew member starts putting on too much weight, they just beam the fat out.
In the first place, food technology in TOS was never clearly defined. In "Charlie X," there were references to a ship's galley, ovens, and synthetic meatoaf. In "Arena," McCoy hankers for a good old "non-reconstituted" meal. As for those ubiquitous food dispensers, we don't know if they were meant to be synthesizers. They could simply be the delivery end of an elaborate dumbwaiter system (although whatever a character ordered usually appeared almost instantaneously).
In "The Corbomite Manuever," Yeoman Rand says she'll bring Kirk something else if he doesn't like the salad. So while McCoy as Chief Medical Officer can make dietary recommendations to any crew member including the Captain, he doesn't have absolute authority over what anyone eats. (Or the captain can override his authority, because he's the friggin' Captain.)
A crew member's "diet card" could simply be a recommended meal plan; it doesn't have to be a physical piece of paper.