Possible. But requires complex custom code modifications.
User fills in registration fields>>goes to "select membership" page>>makes the payment>>gets registered.
This is complex modifications since somehow software needs to save info about not yet registered user, then restrict access to site until the payment is not confirmed + check whether email is verified, if email verification feature is enabled.