I believe "formal" would apply to an essay submitted in fulfillment of a class assignment or a magazine article whose target audience would be sufficiently aware of the rules of grammar to be offended by the misuse of the construction. In a "formal" narrative, I could easily see the writer saying something along the lines of, "...They never suspected it was I who let the dogs out."(Not that I would use those words to make that point).