It is somewhat rare to go from an AOA residency to an ACGME fellowship, but it is technically allowed. You usually see it in "undesirable" fellowships, which may include ID, hah. If I were you, I would aim to do an ACGME residency at a program that has an affiliated ID fellowship.