How can I use the A and D keys to allow my character to walk to the sides?

You would probably want to setup a 2D blend space with the strafing animations. Have a look at this video which briefly goes over the 2D blend space: - YouTube