The answer to your question depends completely on whether this node in the circuit is GFCI-protected. GFCI protection is an absolute must for your disposer; it's a high-amperage electric motor hooked up to your kitchen drain.
Since this J-box doesn't have a standard 3-prong outlet, you'll need to find another outlet on the same circuit; look for a countertop outlet nearby. Plug in an outlet tester (like the one below, available for $5-10 from your local big-box home improvement store), turn on the disposer, and hit the black button on the tester to short hot to ground, inducing a "ground fault".
If the disposer has GFCI protection, it will cut out, and you're golden as far as circuit safety. If not, you definitely need to rewire this J-box with a GFCI outlet.
Even if the disposer is GFCI protected, you have other problems. The outlet is in a "wet" place; you hope that the under-sink area never leaks, but there is always, always, a plumbing emergency at the kitchen sink at some point. To avoid a continuous ground fault through contact with standing water in the J-box (which would prevent you from resetting the GFCI until the whole area dried out), you should seal this area as best you can. A little adhesive spray foam to fill the gap between the wall and the back of the cabinet, followed by a layer of silicone adhesive caulk to waterproof the spray foam (people think spray foam is waterproof, but it really isn't), and a child-resistant outlet and plate with a rubber or neoprene gasket (and/or another dab of silicone) should keep the water out in any situation less than a full flood.
Best Answer
You could. But don't!
Instead, replace the 3-wire outlet with a 4-wire outlet. It is much safer. There are no downsides. You will have to replace the dryer cord/plug with a 4-wire cord/plug, and remove the jumper connecting ground and neutral on the dryer (typically a green wire going from the neutral connection to some bare metal spot on the dryer).
You would have to do the same thing if it was a 10/3 as well. That is, assuming your 10/3 is (like the 8/3) 3 regular wires (typically black/red/white) + a ground wire.
If your 10/3 does not have a ground wire, ask for more help.