So is it possible to write a certified application and published it?
Unfortunately not.
See the section in packaged apps about certified apps. Apps published to the firefox marketplace can be privileged but not certified. For more information about the privileges marketplace apps can get, see app permissions.