Hi, yes theoretically yes, but there r certain precautions n proper arrangement r required to do it to get results, same thing is done in fertility clinic know as iui, artificial intrauterine insemination. So if u r doing it with purpose of getting ur wife
pregnant then my advise would be that u take professional help.
If there is some issue y u r needed to do so then consult for that too as there r lot of options available in medical science where u can do things what u want but in right way n get results.
Also for fertility issue u can start homoeopathy treatment which is natural, effective n economical.