Yes, as long as it's totally honest. If a boss is totally honest, with your good work AND your bad, it's very motivating. Quite often the person doesn't realize the bad stuff is happening, and if brought to attention will also make the worker think twice. If a boss praises only it is not motivating.