Probably most speakers wouldn't find your first version is ungrammatical as such, but it's certainly not the most common way of expressing what you want to say. If have a look, for example, at ngram data for "forgive my being" vs "forgive me for being", you'll see that the latter version is several times more common.