I have somehow completed my PhD without having the required theoretical understanding of my field. Can I have an academic career?
This is a pretty solid case of Imposter Syndrome, I think. Yes, lots of other people have experienced it. Part of it is the letdown after completing a degree, perhaps. Part of it is the realization that your field is very wide and no one can really grok all of it. 

But you seem to be able to function pretty well in your field. Thesis? Check. Papers? Check. Specialization? Well, yes, of course. Doctorates are like that. 

The test of it, is whether you can get a suitable position. If you don't fall in to depression and sabotage your own applications then I doubt that there are any real barriers. The research you love is valued by academia. Do that. 

If you are still connected to the university, they probably have a counseling office where there is someone familiar with these sorts of feelings and can give you some professional advice. 



As to your grades, they were apparently strong enough that people let you continue your education to the end. No one will care much anymore about them. They can be a poor, or at least imperfect, surrogate for measuring knowledge in any case.