Depends. Are you just rooted or are you running a custom ROM? If you're just rooted and not using the boot straps you can simply use z4Root and select back to stock. If you have a custom ROM installed, you''ll need to flash your back up and then you can use z4Root.
No back up? Well, then it's time to sbf. And I don't have a link for you on how to do that with the X but I can put you in a better area for further assistance if necessary.
Did you root and install a rom or just root. If all you did was root then you can unroot and do a factory reset. If you used droid x bootstrap and installed a rom then I recommend sbf.
[video=youtube;c58XaWnr6XE]http://www.youtube.com/watch?v=c58XaWnr6XE]YouTube - How To SBF Droid X to full 2.3.340 OS 2.2 Now linked for Droid 2[/video]
If you used a rom or sbf then you changed something in your system files. A factory reset do not reset your system files back to stock. If you deleted an app then you will not be able to get an ota. That is why I asked if you used a rom. If not then yes as long as you did not mess with the system files then a factory reset will work fine after you unrooted.