How do I perform a regression when I know there is a multiplicative relationship between the regression coefficients? Suppose I'm attempting to use linear regression but instead of
$$y_i = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \beta_3 x_3 + \beta_4 x_4 + \varepsilon_i,$$
for scientific reasons, I know that $β_2=\alpha\beta_1$ and $β_4=\alpha\beta_3$. So my formula is actually:
$$y_i = \beta_0 + \beta_1 x_1 + \alpha\beta_1 x_2 + \beta_3 x_3 + \alpha\beta_3 x_4 + \varepsilon_i$$
Note that the variable $\alpha$ is the same in both equations but unknown. How should I tackle something like this?

This is essentially a non-linear least squares problem, and the R function nls may be of interest to you. Rather than describe the workings of the function though, let me briefly outline the relevant statistical theory.
The basic idea behind non-linear least squares is as follows. You have some regression function $f(X;\theta)$ which takes predictors $X$ and parameters $\theta$ and predicts the value of the outcome $y$. In particular, the assumption is that $\mathbb E[y|X] = f(X;\theta)$ for some $\theta$ in your case, $\theta = (\beta_1,\beta_3,\alpha)$ and $f(x_1,x_2,x_3,x_4;\theta) = \beta_1(x_1+\alpha x_2) + \beta_3(x_3 + \alpha x_4)$. The fact that $f(X;\theta)$ is the conditional expectation of $y$ given $X$ implies that in population, we have that the true value of the parameter, $\theta_0$ satisfies
$$\theta_0 = \mathrm{argmin}_\theta\, \mathbb E[(y - f(X;\theta))^2]$$
The fact that $\theta_0$ solves this optimization problem immediately implies an estimation strategy: simply choose $\hat\theta$ to be the value of the parameter that minimizes the in-sample analogue of the above objective function, that is
$$\hat\theta = \mathrm{argmin}_\theta\, \frac1n\sum_{i=1}^n (y_i - f(X_i;\theta))^2$$
This is the reason for @wzbillings's suggestion above to use the R optim function.
If you are interested in how, given this estimate, you should compute standard errors, you can consult previous posts, such as this one.
