Here is a proof that the answer is positive for a totally disconnected $K$. I will prove it in the case $n\ge 3$ since for $n=2$ there exists a homeomorphism $h: R^2\to R^2$ sending $K$ to a subset of the unit circle. I will also assume that the set $K$ is infinite (since the claim is clear otherwise).
First of all, since $K$ is compact and totally disconnected, there exists a compact subset $C\subset S^1$ and a homeomorphism $f: C\to K$. I will be using the following:
Lemma 1. Let $A\subset R^n, n\ge 3$, be a compact subset of covering dimension $\le 1$ (e.g. a subset homeomorphic to a subset of ${\mathbb R}$). Then $A$ does not locally separate $R^n$.
The proof is a direct application of the Alexander duality and I will omit it.
I will extend $f=h_0$ to topological embedding of $S^1$ as follows. I enumerate the components $I_j$ of $S^1-C$, $j\in {\mathbb N}$, set $C_0=C$ and
$$
C_j:= C\cup I_1\cup ... \cup I_j.
$$
I first extend $h_0$ inductively to topological embeddings $h_j: C_j\to R^n$ such that $h_{i}$ is the restriction of $h_{i+1}$.
Assume that $h_j$ is defined. Let $B_{j+1}$ denote the unique closed round ball in $R^n$ of the diameter equal to the diameter of $h(\partial I_{j+1})$ and containing the 2-point set $h(\partial I_{j+1})=\{x^\pm_{j+1}\}$.
Lemma 2. There exists a topological arc $\alpha_{j+1}\subset B_{j+1}$ connecting the points $x^\pm_{j+1}$ and otherwise disjoint from $h_j(C_j)$.
Proof. Take a biinfinite sequence
$(y_i)_{i\in {\mathbb Z}}$ in $B_{j+1} \setminus h_j(C_j)$ such that
$$
\lim_{i\to\pm \infty} y_i= x^\pm_{j+1}.
$$
Then (since $h_j(C_j)$ is (at most) 1-dimensional) use inductively Lemma 1 to connect successive points in the sequence $(y_i)_{i\in {\mathbb Z}}$ by smooth simple arcs in $B_{j+1} \setminus h_j(C_j)$ whose diameters converge to zero as $i\to\pm \infty$. qed
Next, extend $h_j$ to $I_{j+1}$ by a homeomorphism parameterizing the arc $\alpha_{j+1}$. The result is $h_{j+1}$. By the construction, it is a topological embedding.
Together, the maps $h_j, j\in {\mathbb N}$, define an injective map $h: S^1\to R^n$ such that $h|_{C_j}=h_j$. Continuity of $h$ follows from the fact that diameters of the sets $h_j(I_j)$ converge to $0$ as $j\to\infty$. Hence, $h$ is the required topological embedding.