Have a ray create a force?
Due to the dynamic nature of that operation you need a Python controller to apply that impulse/force.

I suggest to use a ray sensor. It provides the object hit, the position where it was hit and the direction you measured.
Usage

Place this snippet in a python file force.py

import bge 
import mathutils

PROPERTY_STRENGTH = "strength"
DEFAULT_STRENGTH = 1.0

def applyAtHit():
    if not allSensorsPositive():
        return 
    sensor = getDetectionSensor()
    affectedObject = sensor.hitObject
    hitPosition = sensor.hitPosition

    strength = getOwner().get(PROPERTY_STRENGTH, DEFAULT_STRENGTH)

    direction = mathutils.Vector(sensor.rayDirection).normalized()
    force = direction * strength

    affectedObject.applyImpulse(hitPosition, force)

def getDetectionSensor():
    return bge.logic.getCurrentController().sensors[0]

def getOwner():
    return bge.logic.getCurrentController().owner

def allSensorsPositive():
    for sensor in bge.logic.getCurrentController().sensors:
        if not sensor.positive:
            return False
    return True


Apply following logic to the measuring object:


Setup a ray sensor (must be the first one) with a distance that covers the range you want to have, [True Level Triggering] is not needed as you want a single impulse
Setup a Python controller in module mode with Module: force.applyAtHit
Ensure detected objects are physics objects (dynamic, rigid body, softbody)




How does it work?

When all sensors are positive and any of the sensors triggers the controller the function applyFromHere() will be executed. Each run will apply exactly one force or no force at all. 
That is the reason for [True Level Triggering] disabled. This prevents subsequent execution unless you "activate" again. Means you need all sensors positive and at least one to trigger. 

The ray sensor checks for an hit. The Python controller calculates the


the affected object
the direction towards the affected object
the strength of the force


With that the Python controller applies the individual force to the affected object. Here we use applyImpulse(). This does not just affects the linear motion, it results in change of the torque too.

I hope it helps