Derivation of Wannier orbitals and minimal-basis tight-binding Hamiltonians for twisted bilayer graphene: First-principles approach