Positive periodic solutions and optimal control for a distributed biological model of two interacting species