Can the momentum eigenstates be non-orthogonal? Consider the Hilbert space of a particle, whose position domain is confined to $q\in[0,1]$ (e.g. a particle in a box with unit width). Using 
$$
1=\int_0 ^1 dq |q\rangle\langle q|
$$
and the position representation of the discrete momentum eigenstates
$$
\langle q | p_n\rangle=e^{i\pi n q},
$$
inserting the above identity operator and integrating leads to the scalar product 
$$
\langle p_n|p_m\rangle=\frac{(-1)^{m-n}-1}{i\pi(m-n)}\neq\delta_{nm}.
$$
This would mean that the eigenbasis of a physical observable is not orthogonal.
Is there an error in my derivation, and if not, how can this be understood physically?
 A: 
This would mean that the eigenbasis of a physical observable is not orthogonal. Is there an error in my derivation, and if not, how can this be understood physically?

The set of eigenfunctions of $\hat p$ in the sense
$$
\hat{p}\phi = p\phi
$$
is sure to be orthogonal if they belong to a subset of $L^2((0,1))$ on which the operator $\hat{p}$ is symmetric, meaning
$$
\int_0^1 \phi_1^* \hat{p} \phi_2dq = \int_0^1 (\hat{p}\phi_1)^* \phi_2 dq 
$$
for any two functions of the subset.
The momentum operator $\hat{p} = -i\hbar \partial/\partial q$ on $(0,1)$ is symmetric only for subset of eigenfunctions $e^{ipq/\hbar}$ that obey favorable boundary condition (with the right value of $p$ - see Ruslan's answer) this subset of eigenfuncitons is orthogonal and forms a basis of the subset.
For most of the eigenfunctions $e^{iqp/\hbar}$, however, the operator $\hat{p}$ is not symmetric and there is no orthogonality.
A: Momentum is be conserved iff the Hamiltonian has translational symmetry. Usual boundary conditions such as homogeneous Dirichlet or Neumann conditions don't allow for such symmetry. But there still are specific conditions, which do allow the Hamiltonian to have translational symmetry on the bounded domain: Born—von Karman boundary conditions.
Thus in the box $q\in[0,1]$ the momentum operator $\hat p=-i\partial_q$ is self-adjoint if you use Born—von Karman boundary conditions, i.e. conditions of periodicity of wavefunction:
$$\psi(0)=\psi(1),$$
$$\psi'(0)=\psi'(1).$$
Then it has a set of orthonormal eigenfunctions
$$\phi_p(q)=e^{ipq}$$
with $p=2\pi n.$
Any other boundary conditions don't give you orthogonal eigenfunctions. In fact, the second condition is extraneous because the operator is first order derivative, so that eigenequation $\hat p\phi(q)=p\phi(q)$ is a first order differential equation, which has only one free parameter. This is one of the reasons why you can't impose usual two boundary conditions like in Dirichlet or Neumann case.
