What dictates which protein to synthesize at a given time?
Your asking how a cell or organism regulates protein synthesis. This is a complex question, with many different parts. It is well presented in Alberts Molecular Biology of the Cell, Chapter 7, on genetic switches. Here's an online section from that chapter in the 2002 edition.

There is a lot involved in regulating protein synthesis. As a general rule if you can imagine regulating it, it's regulated. Here's a figure from Alberts to get you started thinking about this:



There are some things that are required for all genes. General transcription factors, for example, and the Pribnow, or TATAAT box. The presence, absence, location, and accessibility of these things can regulate the levels of protein synthesis by the cell. Other things are going to discriminate between different genes. Under certain conditions, certain gene regulatory proteins will be produced, not destroyed as quickly, activated, allowed entry into the nucleus, etc, regulatory sequences will be exposed or not exposed, methylated or unmethylated... and transcription rates will change accordingly (increasing if those protein gene interactions stabilize assembly, binding, and transcription by the polymerase, decrease if they destabilize assembly, binding, and transcription by the polymerase).

This is just a taste of the wonderful world of gene regulation in the eukaryotic cell. As it says in Alberts, of the roughly 30,000 human genes, an estimated 5–10% encode gene regulatory proteins. And these are just the proteins that directly regulate transcription.