Can I cover junction boxes in the attic with insulation?
Your best bet in this case is to contact the local inspector,  since this situation may be open to interpretation. The most fitting code states:


  National Electrical Code 2008
  
  ARTICLE 314 Outlet, Device, Pull, and Junction Boxes; Conduit Bodies; Fittings; and Handhole Enclosures
  
  314.29 Boxes, Conduit Bodies, and Handhole Enclosures to Be Accessible. Boxes, conduit bodies, and handhole enclosures shall be
  installed so that the wiring contained in them can be rendered
  accessible without removing any part of the building or, in
  underground circuits, without excavating sidewalks, paving, earth, or
  other substance that is to be used to establish the finished grade.
  
  Exception: Listed boxes and handhole enclosures shall be permitted where covered by gravel, light aggregate, or noncohesive
  granulated soil if their location is effectively identified and
  accessible for excavation.
  
  Article 100 Definitions
  
  Accessible (as applied to wiring methods). Capable of being removed or exposed without damaging the building structure or finish
  or not permanently closed in by the structure or finish of the
  building.


It may or may not be acceptable, depending on if the inspector considers insulation "part of the building".

If you do end up covering the boxes, it might be a nice idea to mark/flag them in some way. This way you; or any other future owner, will be able to locate them later if need be.