I wouldn't do it. The student whose answers you will be using might get really uncomfortable even if no one else knows who they are. A simple breakdown of your grading scheme (2 points for FOC, 1 point for solving for x1 and x2, 1 point for the graph etc) should be enough, shouldn't it?