If $D_k$ is independent of $(R_1,\ldots,R_{k-1})$ and $(R_1,\ldots,R_k)$-measurable then $D_k=g_k(R_k)$ for some measurable map $g_k$? Let $R_1,...,R_n$ be i.i.d random variables. Let $\mathcal{F}_0 = \{\emptyset,\Omega\}$ and define $\mathcal{F}_k = \sigma(R_1,...,R_k)$ for $1 \leq k \leq n$. Let $D_1,...,D_n$ be random variables such that $D_k$ is $\mathcal{F}_k$-measurable and independent of $\mathcal{F}_{k-1}$ for $1 \leq k \leq n$.
Is it true that $D_k = g_k(R_k)$ for some measurable map $g_k$ for $1\leq k \leq n$?
 A: We can show that there exists functions $g_1,\dots,g_n$ such that the vectors $\left(D_k\right)_{k=1}^n$ and $\left(g_k\left(R_k\right)\right)_{k=1}^n$ have the same distribution.
Maybe this is sufficient for the purpose of the opening poster. Because in general, we cannot find functions $g_1,\dots,g_n$ such that $D_k=g_k\left(R_k\right)$ almost surely, which is shown by the following counterexample in Did's comment. 
Let $\left(R_1,R_2\right)$ be such that $\Pr\left(\left(R_1,R_2\right)=\left(x_1,x_2\right)\right)=1/4$ for all $\left(x_1,x_2\right)\in\left\{-1,1\right\}$. Then $R_1$ and $R_2$ are independent and have the same distribution. Letting $D_1=R_1$ and $D_2=R_1R_2$, one can see there there is no function $g_2$ such that $D_2=g_2\left(R_2\right)$ almost surely. 
Indeed, let $A:=\left\{\left(R_1,R_2\right)=\left(1,1\right)\right\}$ and 
$B:=\left\{\left(R_1,R_2\right)=\left(1,-1\right)\right\}$. If we could find a function $g_2$ such that $D_2=g_2\left(R_2\right)$ almost surely, then $D_2\mathbf 1_A=1=g_2\left(1\right)$ and $D_2\mathbf 1_B=-1=g_2\left(1\right)$.
Let $g_1$ be such that $D_1=g_1(R_1)$. 
By Doob's theorem, there exists functions $f_2,\dots,f_n$ such that $D_k=f_k\left(R_1,\dots,R_k\right)$ for all $2\leqslant k\leqslant n$.
For $2\leqslant k\leqslant n$, define the function 
$$
g_t\left(x_1,\dots,x_{k-1}\right):=\mathbb E\left[\exp\left(it 
f_k\left(x_1,\dots,x_{k-1},R_k\right)\right)\right].
$$
Let $A_{t}:=\left\{(x_1,\dots,x_{n-1})\in\mathbb R^{n-1}    \mid \mathbb E\left[\exp\left(it 
D_k \right)\right]=g_t\left(x_1,\dots,x_{k-1}\right)\right\}$. Using independence of $D_k$ with respect to $\mathcal F_{k-1}$ and computing the conditional expectation of $\exp\left(it 
D_k \right)$ with respect to $\mathcal F_{k-1}$, we can see that for all $t$, 
$$
\mathbb P_{\left(X_1,\dots,X_{n-1}\right)}\left(A_t\right)=1.
$$
Defining $A:=\bigcap_{t\in\mathbb Q}A_t$, the previous equality implies that $\mathbb P_{\left(X_1,\dots,X_{n-1}\right)}\left(A\right)=1$. Let us choose $(x_1,\dots,x_{n-1})\in A$ and define 
$$
g_k\left(u\right)=f_k\left(x_1,\dots,x_{k-1},u\right).
$$
The characteristic functions of $g_k\left(R_k\right)$ and $D_k$ coincide at all rational points  hence are equal. Moreover, an induction argument shows that the sequence $\left(D_k\right)_{k=1}^n$  is independent. Therefore, equality of the law of marginals allows to conclude equality of law of the vectors.
