Interface and thickness control of polytype heterostructures grown by molecular beam epitaxy