Since they are attracted to overripe and damaged fruit, regular harvesting and sanitation will help keep these pests at bay. Avoid pesticides that require a waiting period before you can harvest. You can try neem oil, which is safe and won't put a limit on harvesting, though it may not help with the adults since they are more hard-bodied. Nonetheless, it cannot hurt.
Other people find trapping of these pest an effective method of control. A popular recipe includes mixing 1 cup water, 1 cup dark corn syrup, one cake of yeast, and a spoonful of vinegar. Place the mixture in a container just outside the garden or area where your raspberries are planted. This mixture will attract the beetles and drown them.
Additionally, fermenting plant juices from over ripe fruits will work, such as with ripe bananas and melons. Discard the trapped pests.