Totally legit. You are allowed to oversize wire anytime you want.
Breaker amperage is determined by the smallest wire in your circuit. So if all the other wire is 12 gauge, you may breaker for 20A. If any of it is 14ga, you must breaker for 15A.
You are also limited by devices, but common "15A" outlets are allowed in 20A circuits.
You may get into physical fit issues trying to get 10 gauge wire onto terminals meant for 12 gauge. At worst you can pigtail a few inches of smaller gauge wire onto the outlet, but the "smallest wire" rule applies here. That should fit fine in a common 2-1/8 x 4" box if there isn't anything else in there. But I recommend going for the deepest box you got, because those 10ga wires will be stiff and hard to stuff in the box.
Cap off the extra wire with a wire-nut, tape or both; no need to strip it but its copper core can't be permitted to hit anything metal. You might also wrap the outlet along the edge with tape a few times, covering the exposed side terminals.