How to avoid nailheads in stud behind plaster?
Answers, in order.


This is plaster and wood lath.
Toggle bolts are typical, but the comment from @EdBeal about using the studs is spot on. Plaster is quite variable in its holding power... chances are fair that it wouldn't fail, but you can't be sure until you try.
Forget the pilot hole unless you're having real problems driving the screw. The stud is softwood, so a pilot isn't necessary.
The nails that attach the wood lath to the studs are tiny, so a screw will push past them. (Unless you're really unlucky and hit one dead-on-square in the middle, but that's very unlikely. Then reposition the screw a tiny bit up/down and do over.)
You should always worry about electricity, but the chance of you drilling through a wire is relatively slim. 
Screw the top of one of the standards into the stud. Use a level to make it plumb and screw the bottom. With the level, mark the tops or bottoms of subsequent standards. Align to the mark, roughly plumb, screw one end, plumb for real, screw the other end. Repeat.