In a hypothetical tournament game where there is a completely forced series of moves for your opponent (e.g. their next move is an only-move and you have already decided on the response), would it be legal to record the moves before they have been played?
Well, it isn't legal for two reasons,
One, lets say that the opponent gave you an handshake. That would mean that the recorded moves are null, and it may cause some troubles with the arbiters.
Two, Article 8.1:
In the course of play each player is required to record his own moves and those of his opponent in the correct manner, move after move, as clearly and legibly as possible, in the algebraic notation (Appendix C), on the score sheet prescribed for the competition. It is forbidden to write the moves in advance, unless the player is claiming a draw according to Article 9.2 or 9.3 or adjourning a game according to the Guidelines of Adjourned Games point 1.a.. A player may reply to his opponent’s move before recording it, if he so wishes. He must record his previous move before making another. Both players must record the offer of a draw on the score sheet. (Appendix C.13) If a player is unable to keep score, an assistant, who must be acceptable to the arbiter, may be provided by the player to write the moves. His clock shall be adjusted by the arbiter in an equitable way
Note especially the:
It is forbidden to write the moves in advance, unless the player is claiming a draw according to Article 9.2 or 9.3 or adjourning a game according to the Guidelines of Adjourned Games point 1.a..
You can find the rulebook here.
The answer from Tal refers to the FIDE rules, the USCF rules are a little bit different, but have recently been changed to be less friendly to writing down moves before making the move. The specific situation you refer to in your question, writing down a string of moves ahead of time, would be illegal under both FIDE and USCF rules. While the USCF rules do not specifically state you can only write the next move, they definitely infer it by stating a move may be written before the move is made (old rule), and that no other notes except those mentioned in the rule book are allowed.
The rules have changed since the addition of electronic scorecards, and it is now illegal to record a move before making it. Though the penalty recommended to TDs is just that a warning be issued.
The USCF rulebook is not available in electronic form, so I can't copy and paste the relevant sections, nor link to them.