They are both grammatically correct.
However, "Am I not..." is much more formal and can sound a bit funny.
We say "Aren't I...", which looks grammatically incorrect but isn't. It used to be (and still is in some places) "Amn't I...", but due the the difficulty in pronunciation, "Aren't I..." became the commonly used for form.