salaam/peace Ijaz,
It is possible you bring up an underlying valid point.
The key word in 29:45 is "tanha" which primarily means forbids in its other occurrences, see here:
http://corpus.quran.com/qurandictionary.jsp?q=nhy#(29:45:11)
According to
PRL (based on classical Arabic dictionaries) some of its other meanings include: "to prevent, chide away, prohibit, make one to stop from, restrain, interdict, hinder, desist, refrain.
If we assume salat means prayer:
29:45 states: "indeed/surely* the prayer forbids/prevents/prohibits/restrains/hinders from the immorality and evil deeds..."
*Arabic: inna, implies strong/certain emphasis
Now clearly if one inserts "forbids" into the verse it seems awkward as that would imply the prayer involves information relay, e.g. tells you to do ABC and not do XYZ. This is not really what Traditional ritual prayer does.
Please note this aspect of salat is not an isolated incident, e.g. see 11:87 (Shuaib, does your salat command you that we leave what our forefathers worship/serve...". Again, this is not what Traditional ritual prayer does.
However, if you opt for "tanha" meaning "restrains/hinders" in 29:45 then you could interpret it as Truth Seeker mentioned.
Thus, the answer to your question will depend on how you interpret "tanha" and "salat". I personally do not understand "salat" to mean the Traditional ritual prayer.