If you feel pain in the upper back while walking with wrist weights on you must check your posture. Keep your entire body weight balanced centrally. The head should be above the body, and not in front of it. Read this article on How to Improve Your Walking Style to Ease the Pain:
Once you are aware of your posture, you can try this exercise while you walk.
Upper Arm Toner With Wrist Weights:
Perform the arm sequence without walking in slow motion first until your arms get used to moving in this way.
STARTING POSITION: Stand with the arms relaxed by your sides.
Now, turn the left palm in to face back and the right palm out to face front. We are going to swing, right arm forward, left arm back.
With the right arm going forward and the left back, do only one swing as in normal walking but higher, up to 90 degrees or maximum height. Try to keep the arms straight.
On the second swing, swap the direction that the wrists are facing. In other words, always keep all palms up while swinging. Practice this on the spot until you can easily coordinate the moves.
1. Walk for eight steps swinging your arms as normally.
2. For the next eight steps, hold the arms in the upper-most position palms up. You are still walking on, but your arms are static for eight steps.
Repeat the walking sequence as many times as you can / want.
N.B. You can do the same exercise to the side (one arm across the body, the other to the side).