i will offer an answer to this, because i don't believe this is homework. see next comment below:
Perhaps something like a perfect dopamine antagonist with no
side-effects. Call it P
no, let's call it an antipsychotic. perhaps P stands for prochlorperazine. i think you mean dopamine agonist. dopamine antagonists invoke what could best be described as a chemical lobotomy, and are antithetical to any notions of motivation, salience, achievement, or reward.
a. Is there an optimal time to introduce P to facilitate the
development of the desire/interest/motivation to do task T?
yes -- immediately once the desired behaviour has been undertaken successfully. with some interesting exceptions e.g. food poisoning, the shorter the latency between any behaviour and its consequences, the stronger the association between the two will become apparent to the individual. think of it as a "theory of causality" -- the shorter the latency, the more confident we become that the behaviour caused the outcome.
this is why the route of administration of a drug has a strong influence upon an individual's susceptibility to addiction, or to put it another way, motivation to consume the drug again. smoked or IV versus oral administration. conversely, it's much harder to engage in behaviours that might be beneficial to us years down the track because we have less confidence that engaging in that behaviour will result in the desired outcome.
b. Is this even possible if the subject knows that P induces the pleasure?
yes. however, if there is no intrinsic motivation to do the task, it will be much harder to facilitate the desired behaviour in the absence of the reinforcer. if you only did something because of the outcome, and not because you found some inherent enjoyment from it, after a while you might start thinking about other behaviours you could engage in to attain the same outcome.
in the case of our fictional substance P: sure, i could keep doing what you want me to in order to obtain it. but in engaging in your task as simply a means to an end, i might start to consider more direct routes to that same end. for example, i could steal the keys to your medicine cabinet. or place a blood-filled syringe to your neck and tell you to hand it over.
c. Even if pleasure and T are then linked, is it only under the assumption that T leads to pleasure, and thus if P is no longer present, the interest in T will wane?
yes. here, new learning takes place: the individual has now constructed a new theory of causality. whereas once upon the individual learned that engaging in T offered access to P, it now no longer does.
i would go so far as to argue that if one was not aware of the presence of P, one's interest in the task would persistent for far longer a period, and perhaps indefinitely. "perhaps i'm not doing the task correctly... i know, it's because i've had a lousy week... " etc, etc. one might even start engaging in superstitious behaviours in the belief that it is this superstitious ritual that influences the likelihood of the reward.
in order to "slow down" this new learning (extinction), it would be important to ensure that the reinforcement of T with P is not 1:1. the more tightly a behaviour is linked to an outcome, good or bad, the more one expects the outcome to occur when they engage in that behaviour. when the outcome is now absent, the more apparent it is that something about the behaviour -> outcome relationship has changed.
to understand how this works, read into the relationship between different reinforcement schedules and rate of extinction. also read into the phenomenon of spontaneous recovery.
now, you will need to excuse: my motivation to continue typing has now waned, and in it's place, a desire to go get high.