Can I use metal masonry device (switch) boxes in a stud wall?
Masonry boxes are metal because concrete can get wet and conduct electricity.  The box can be grounded to prevent this becoming a problem.  Code allows you to use items that are MORE safe than is required.  For instance, if code requires 14 gage wire, you're OK using 12 gage (but not 16).  The same holds here.  You're proposing using a more safe box than is required.  As long as it physically fits, you will be OK.