The only restriction is entering the US as a visitor with the intent to STAY and adjust status. The OP clearly stated the intent to start the spousal visa process, instead. That is 100% legal.
To my knowledge, there has never been a single spousal visa case denied because the marriage took place inside the US during a visit. Many, many foreign visitors marry in the US every year.
Additionally, the K-3 is obsolete. They are very rarely ever issued.