A friend of mine actually trained his collie to ring a bell when it needed to go outside, however not all dogs are so polite. Most of them simply scratch, whine, bark or endlessly pace at the door, while others simply forget and leave you a big surprise or worse a nice streak where they dragged their behind across your carpet. It's just easier to get a PetSafe - Smart Pet Sensing Doorbell.
This unique cordless pet doorbell chimes when a dog or cat wearing a special encoded smart key approaches. The smart key attaches to their collar and when they approach the door and get within a certain range that you set, the doorbell chimes and you can either go let them in or out. It sure beats listening to the barking and whining.
Another option if you don't want to get up at all, is the equally cool Automatic Locking Pet Sensing Door.