Attach partition wall to lath and plaster wall
To answer the original question, the studs at either end of the closet will not need to define the dimensions. The stud at either can be screwed in place. Do not use nails. The vibration from setting the nail will break off the keys of plaster that hold the plaster up on the wall. Use enough screws to increase the chances of finding the wood lath to secure the last stud in the wall. The top and bottom plates as mentioned in other answers will do the rest.

To address another valid issue that was brought up about direction the walls over the joists. If the long wall is across the joists, and portions of the wall that are supported by these joists will be fine. Actually, the wall should be so light in weight there will be, or should be, little or no concern. If the side the door is hinged happens to sit on or near a joist, the better the support for the wall. Half the weight on the shelves will be supported by one of the existing walls the other at the back existing wall and a bit on the new wall. If the floor that the closet is built on has subfloor, all the better.